home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
Z-Misc Series
/
(k)zh.d64
/
txt.discard
< prev
next >
Wrap
Text File
|
2007-03-01
|
3KB
|
146 lines
─╔╙├┴╥─ ┴ ╥╧═'┼─ ╨┴├╦┴╟┼
BY ─ICK ╦LINGENS,
─UTCH ├╧═┴╠ ╒SERS ╟ROUP
┘OU HAVE DONE A LOT OF TYPING: 500+
LINES ARE IN COMPUTER MEMORY. ┴ NEW
PROGRAM IS BORN. ╘HE ONLY THING LEFT
TO DO IS TO LINK A PACKAGE ONTO IT
AND THEN TEST THE PROGRAM. ╘HE
PACKAGE NAME IS 'PKG.TEXT'; BUT BY
MISTAKE YOU TYPED
╠╔╬╦ "PKG.TEST"
┴ND THAT PACKAGE IS ROM'ED!
╫HAT TO DO? ─ISCARD DOES NOT HELP
YOU: A ROM'ED PACKAGE CANNOT BE
DISCARDED. ╘HERE ARE SOME
POSSIBILITIES:
1. ╙WITCH THE COMPUTER OFF AND ON AND
... ╔ DON'T LIKE THIS METHOD. ─O
YOU?
2. ╠╔╙╘ "YOUR PROGRAM" // TO DISK
╙┘╙ $C87B
┼╬╘┼╥ "YOUR PROGRAM"
3. ╘YPE THE FOLLOWING LINES
═┼╥╟┼ "PRC.RAMLIBS"
// (IF IT'S ON YOUR DISK)
╙├┴╬
RAMALL
─┼╠ RAMALL
─╔╙├┴╥─
╬OW TYPE
╠╔╬╦ "PKG.TEXT"
// (THE RIGHT ONE!)
═ETHOD 3 IS A TIME SAVING ONE. ╔T IS
BASED ON A SMALL PROCEDURE:
╨╥╧├ RAMALL ├╠╧╙┼─
╒╙┼ SYSTEM
LIBPT:=$C7EF // NUMBER OF LIBRARIES
LIBLO:=$C7F0 // LO START EACH LIB
LIBHI:=$C7FA // HI START EACH LIB
LIBPAG:=$C804 // PAGE OF EACH LIB
MASK:=%00010000 ┬╔╘╪╧╥ 255
NUMBER:=╨┼┼╦(LIBPT)
╞╧╥ I#:=1 ╘╧ NUMBER ─╧
LO:=╨┼┼╦(LIBLO+I#-1)
HI:=╨┼┼╦(LIBHI+I#-1)
PAG:=╨┼┼╦(LIBPAGI#-1)
SETPAGE(PAG)
RAM(LO+256*HI)
┼╬─╞╧╥ I#
┼╬─ "┴LL LIBRARIES ARE RAM'ED NOW"
//
╨╥╧├ RAM(ADRS)
╨╧╦┼ ADRS, ╨┼┼╦(ADRS) ┬╔╘┴╬─ MASK
┼╬─╨╥╧├ RAM
┼╬─╨╥╧├ RAMALL
╔T IS POSSIBLE TO HAVE A TOTAL OF TEN
LIBRARIES (PACKAGES) IN MEMORY AT A
TIME (8 MADE BY YOURSELF AND 2
STANDARD). ╘HE NUMBER OF STORED
PACKAGES IS IN ADDRESS $C7EF.
╙TARTING FROM $C7F0 WE FIND THE LOW
BYTE OF THE START ADDRESS OF EACH
PACKAGE; FROM $C7FA ALL HIGH BYTES
ARE LOCATED.
╘HE PACKAGE PAGES ARE STORED FROM
$C804. ╘HE FIRST BYTE OF THE PACKAGE
ITSELF CONTAINS ITS PAGE INFORMATION.
╞ROM THE FORMAT OF THE FIRST PART OF
ROM'ED PACKAGE:
.LIB C64SYMB
*=<START ADDRESS>
.BYTE <PAGE>+ROMMED
WE DEDUCT THAT 'TO BE ROMMED OR NOT'
IS 'HIDED' IN THAT FIRST BYTE: THE
VALUE OF ╥╧══┼─ IS ADDED TO THE PAGE
SPECIFICATION. ╥╧══┼─ EQUALS
%00010000. ┼.G. IF ─┼╞╨┴╟ WAS USED AS
THE PAGE FOR THE PACKAGE, WE HAVE:
─┼╞╨┴╟ = %01000110
╥╧══┼─ = %00010000
---------+
%01010110
╘O FILTER THE ROM BIT OUT WE USE
'REVERSE BINARY ADDING'.
╫E ACT LIKE THIS:
╨┴╟┼=%01010110
MASK=%11101111 (%00010000 ┬╔╘╪╧╥ 255)
---------BITAND
%01000110
╘HIS PROCESS CHANGES A ROM'ED PACKAGE
INTO A RAM'ED ONE, BUT LEAVES AN
ALREADY RAM'ED PACKAGE AS IT WAS.
╘HIS IS NECESSARY, BECAUSE THERE CAN
BE A RAM'ED PACKAGE IN MEMORY TOO.
╧N DISK THERE IS A PROGRAM
"REMOVE'LIBS". ╘HE PROCEDURE ╥┴═┴╠╠
IS USED IN THE PROGRAM. ┴ SPECIAL
PACKAGE CALLED 'NOTBASIC' IS LINKED
ONTO THE PROGRAM. ╬╧╘┬┴╙╔├ PREVENTS
THE USER OF A PROGRAM FROM TYPING IN
THE COMMANDS:
╬┼╫
┬┴╙╔├
─╔╙├┴╥─
╧NLY AFTER TYPING A CODE THE COMMANDS
ARE EXECUTED.
╞IRST ╠╧┴─ THE PROGRAM (DON'T ╥╒╬ IT
FROM THE DIRECTORY), ╠╔╙╘ IT AND READ
THE REMARKS IN THE PROGRAM, AND
REMEMBER THE CODE. ╬OW TYPE:
─╔╙├┴╥─
AND ╥╒╬.
╧N THE DISK YOU WILL FIND AN (ALMOST)
EMPTY, BUT ╥╧═'ED, 'PKG.TEST' TOO.
╘RY TO LINK THIS PACKAGE TWICE WITH
THE ABOVE PROGRAM STILL IN MEMORY.